<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>css 过度</title>
    <script src="https://cdn.bootcss.com/vue/2.4.2/vue.js"></script>

    <style>
        /* 可以设置不同的进入和离开动画 */
        /* 设置持续时间和动画函数 */
        .fade-enter-active {
            transition: all .3s ease;
        }
        .fade-leave-active {
            transition: all .8s cubic-bezier(1.0, 0.5, 0.8, 1.0);
        }
        .fade-enter, .fade-leave-active {
            padding-left: 10px;
            opacity: 0;
        }
    </style>
</head>
<body>
    <div id="app">
        <button v-on:click="show = !show">
            toggle
        </button>

        <transition name="fade">
            <p v-if="show">hello</p>
        </transition>
    </div>

    <script>
        var vm = new Vue({
            el : '#app',
            data : {
                show : true
            }
        });
    </script>
</body>
</html>